#include "ia32.h"

#include <ntddk.h>
#include <intrin.h>

VOID
DriverUnload(_In_ PDRIVER_OBJECT DriverObject);

EXTERN_C
NTSTATUS
DriverEntry(_In_ PDRIVER_OBJECT DriverObject, _In_ PUNICODE_STRING RegisterPath)
{
	DriverObject->DriverUnload = DriverUnload;

	CR4 Cr4;
	Cr4.AsUInt = __readcr4();
	if (Cr4.LinearAddresses57Bit == 1) {
		KdPrint(("Support for 5-level paging"));
	} else {
		KdPrint(("Support for 4-level paging"));
	}

	return STATUS_SUCCESS;
}

VOID
DriverUnload(_In_ PDRIVER_OBJECT DriverObject)
{
	KdPrint(("DriverUnload Success"));
}